home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / l2sp1a.zip / QUEST.REF < prev    next >
Text File  |  1997-06-26  |  5KB  |  265 lines

  1. ;the random quest stuff is handled in this .ref.. it is fairly complicated
  2. ;so be carefull if you try to change it.. I'm going to be adding more
  3. ;later.
  4.  
  5. @#GETNAME
  6. @do `s01 is `bNo`xname?
  7. @if `p20 is 1 then `s01 is The`xBartender
  8. @if `p20 is 2 then `s01 is Smithy
  9. @if `p20 is 3 then `s01 is Nickabrick
  10. @if `p20 is 4 then `s01 is Selena
  11. @if `p20 is 5 then `s01 is Basil
  12. @if `p20 is 6 then `s01 is Corin
  13.  
  14. @#GETPLACE
  15. @do `s03 is `bNo`xplace?
  16. @if `p20 is 1 then `s03 is Greentree
  17. @if `p20 is 2 then `s03 is PortTown
  18. @if `p20 is 3 then `s03 is FlagCity
  19. @if `p20 is 4 then `s03 is BoneTown
  20. @if `p20 is 5 then `s03 is Sosen`xVillage
  21. @if `p20 is 6 then `s03 is Arrisville
  22.  
  23. @#GETITEM
  24. @if `p21 is 1 then `s02 is sack
  25. @if `p21 is 2 then `s02 is satchel
  26. @if `p21 is 3 then `s02 is small`xbag
  27. @if `p21 is 4 then `s02 is letter
  28. @if `p21 is 5 then `s02 is small`xpurse
  29.  
  30.  
  31. @#complete
  32. ;completes quest
  33. @routine getname
  34. @do `s05 is `s01
  35. ;current guys name is in `s05
  36.  
  37. @routine getplace
  38. ;place put in `s03
  39.  
  40. @do `p21 is `p17
  41. @routine getitem
  42. ;item put in `s02
  43.  
  44.  
  45. @show
  46. `r0`c  `r1 `%Speedy delivery! `r0
  47. `\`2  `0"Yes? Can I help you, friend?" `2asks `s05.   
  48.  
  49. `2  `$"Yeah.  Take this `s02 and pay me!"
  50.  
  51. `k  `0"I've been waiting for this!  Thank you, `%`n`0!"
  52.  
  53.   `2You are paid `$$`p16`2! 
  54.  
  55. @
  56. ;reset quest stuff
  57. ;give money
  58. @do money + `p16
  59. ;add one to quests completed var
  60. @do `p18 + 1
  61. @do `p14 is 0
  62. @do `p15 is 0
  63. @do `p16 is 0
  64. @do `p17 is 0
  65. @do `i44 is 0
  66. @do `i45 is 0
  67. @do `i46 is 0
  68. @do `i47 is 0
  69. @do `i48 is 0
  70.  
  71. @if `p32 is 0 then do
  72.   @begin
  73.  ;woah, they delivered the item same day
  74. @do `p20 random 1 1
  75. @if `p20 is 1 then do
  76.   @begin
  77.   @do `p20 random 5 1
  78.  
  79.   @if `p20 is 1 then do
  80.     @begin
  81.     @do `p08 + 1
  82.     @show
  83.   `0QUEST BONUS:  `%One extra charm point!
  84.  
  85.     @end
  86.   @if `p20 is 2 then do
  87.     @begin
  88.     @do `p03 + 3
  89.     @show
  90.   `0QUEST BONUS:  `%Three extra hitpoints!
  91.  
  92.     @end
  93.  
  94.   @if `p20 is 3 then do
  95.     @begin
  96.     @do `p04 + 1
  97.     @show
  98.   `0QUEST BONUS:  `%An extra Muscle Point!
  99.  
  100.     @end
  101.  
  102.   @if `p20 is 4 then do
  103.     @begin
  104.     @do `p05 + 1
  105.     @show
  106.   `0QUEST BONUS:  `%An extra Dodge Point!
  107.  
  108.     @end
  109.  
  110.   @if `p20 is 5 then do
  111.     @begin
  112.     @do `p19 + 1
  113.     @show
  114.   `0QUEST BONUS:  `%A free gem for your troubles!
  115.  
  116.     @end
  117.  
  118.   @end
  119.  @end
  120. @do addlog
  121.   `r2  `r0 `0`n`2 has made a successful delivery in `0`s03`2. `r2  `r0
  122. @writefile lognow.txt
  123.                                  `2-`0=`2-`%=`2-`0=`2-
  124. @show
  125.   `%QUEST COMPLETED.
  126. `\`k
  127. @drawmap
  128. @update
  129.  
  130. @#GETQUEST
  131. ;gets a random quest or completes it.
  132. @do `p26 is `p20
  133.  
  134. @if `p26 is `p15 then do
  135.   @begin
  136.   @run complete
  137.   @end
  138.  
  139. @label tryagain
  140. ;get destination and dest name
  141. @do `p20 random 6 1
  142.  
  143.  
  144. @do `p22 is `p20
  145. @routine GETPLACE
  146. @routine GETNAME
  147. @do `s04 is `s01
  148.  
  149. ;get name of sender
  150. @do `p20 is `p26
  151. @routine GETNAME
  152.  
  153. ;get item
  154. @do `p21 random 5 1
  155. @routine GETITEM
  156.  
  157. ;generate price for doing it
  158.  
  159. @do `p25 random 800 300
  160. @do `p24 is `p18
  161. @do `p24 * 3
  162. @do `p25 + `p24
  163.  
  164. @if `p14 = `p20 then do
  165.   @begin
  166.   @do `p21 is `p17
  167.   @routine GETITEM
  168.   @show
  169. `r0`c  `r1 `%Asking for a job `r0
  170. `\`2  `s01 `2looks suprised.  `0"What are you doing around here? Go
  171.   deliver my `s02!"
  172. `\`k
  173.   @drawmap
  174.   @update
  175.   @closescript
  176.   @end
  177.  
  178.  
  179. @if `p15 > 0 then do
  180.   @begin
  181.   @show
  182. `r0`c  `r1 `%Asking for a job `r0
  183. `\`2  You sort of already have a quest - you will need to complete that
  184.   delivery before you attempt another!
  185. `\`k
  186.   @drawmap
  187.   @update
  188.   @closescript
  189.   @end
  190.  
  191.  
  192.  
  193. @if `p31 < 1 then do
  194.   @begin
  195.   @do `p31 is 0
  196.   @show
  197. `r0`c  `r1 `%Asking for a job `r0
  198. `\`2  `0"Sorry, `%`n`0.  I have nothing for you today, maybe
  199.   tomorrow, ok?" `2`s01 tells you.
  200.  
  201. `2  (only `0`v07`2 quest opportunities per day are allowed)
  202. `\`k
  203.   @drawmap
  204.   @update
  205.   @closescript
  206.   @end
  207.  
  208. ;make sure they don't get a quest to go to where they are
  209. @if `p20 is `p22 then goto tryagain
  210.  
  211.  
  212. @do `p31 - 1
  213.  
  214.  
  215. @show
  216. `r0`c  `r1 `%Asking for a job `r0
  217.  
  218.   `0"Actually, `%`n`0.. there is something you could do."
  219.  
  220.   `2`s01 points to a `0`s02`2 sitting on the table.
  221.  
  222.   `0Would you deliver this to `#`s04`0 in `#`s03`0 for `$$`p25`0?"
  223.  
  224. @do `v01 is 1
  225. @do write
  226. `x`x
  227. @choice
  228. Yes, I accept this quest
  229. Forget it
  230. @if response is 1 then do
  231.   @begin
  232.   @do `p14 is `p20
  233.   @do `p15 is `p22
  234.   @do `p16 is `p25
  235.   @do `p17 is `p21
  236.   @if `p17 is 1 then `i44 + 1
  237.   @if `p17 is 2 then `i45 + 1
  238.   @if `p17 is 3 then `i46 + 1
  239.   @if `p17 is 4 then `i47 + 1
  240.   @if `p17 is 5 then `i48 + 1
  241.   @do `p32 is 0
  242.   @show
  243. `\`\  `2You agree to make the delivery.
  244.  
  245.   `0`s01`2 hands you the `0`s02`2!
  246.  
  247.   `%QUEST STARTED.
  248.  
  249. `k
  250.   @drawmap
  251.   @update
  252.   @end
  253.  
  254. @if response is 2 then do
  255.   @begin
  256.   @show
  257. `\`\  `0"My, but you're a picky one.  Perhaps I'll have something else for
  258.   you to do later."
  259. `\`k
  260.   @drawmap
  261.   @update
  262.   @end
  263.  
  264.  
  265.